import DashboardLayout from "@/pages/Layout/DashboardLayout.vue";

import Dashboard from "@/pages/Dashboard.vue";
import UserProfile from "@/pages/UserProfile.vue";
import TableList from "@/pages/TableList.vue";
import Typography from "@/pages/Typography.vue";
import Olds from "@/pages/Olds.vue";
import Staffs from "@/pages/Staffs.vue";
import Notifications from "@/pages/Notifications.vue";
import UpgradeToPRO from "@/pages/UpgradeToPRO.vue";
import Login from "@/pages/Login";
import Signup from "@/pages/Signup";
import Collect from "@/pages/Collect";
import Expression from "@/pages/Expression";
import Interaction from "@/pages/Interaction";
import Smoke from "@/pages/Smoke";
import EventTable from "@/pages/EventTable";

const routes = [
  {
    path: "/",
    name: "Login",
    component: Login,
    meta: {
      keepalive: false,
    },
  },
  {
    path: "/",
    name: "Signup",
    component: Signup,
    meta: {
      keepalive: false,
    },
  },
  {
    path: "/",
    component: DashboardLayout,
    meta: {
      title: "Old Care",
      keepalive: true,
    },
    name: "Dashboard",
    redirect: "/dashboard",
    // component: Login,
    // redirect: "/login",
    children: [
      {
        path: "login",
        name: "Login",
        component: Login,
      },
      {
        path: "collect",
        name: "采集",
        component: Collect,
      },
      {
        path: "dashboard",
        name: "主页",
        component: Dashboard,
      },
      {
        path: "user",
        name: "个人中心",
        component: UserProfile,
      },
      {
        path: "table",
        name: "入侵检测",
        component: TableList,
      },
      {
        path: "expression",
        name: "老人表情识别",
        component: Expression,
      },
      {
        path: "interaction",
        name: "交互检测",
        component: Interaction,
      },
      {
        path: "smoke",
        name: "抽烟检测",
        component: Smoke,
      },
      {
        path: "typography",
        name: "摔倒检测",
        component: Typography,
      },
      {
        path: "eventTable",
        name: "事件信息报表",
        component: EventTable,
      },
      {
        path: "olds",
        name: "老人信息管理",
        component: Olds,
      },
      {
        path: "staffs",
        name: "义工信息管理",
        meta: {
          hideFooter: true,
        },
        component: Staffs,
      },
      {
        path: "notifications",
        name: "工作人员信息管理",
        component: Notifications,
      },
      {
        path: "upgrade",
        name: "Upgrade to PRO",
        component: UpgradeToPRO,
      },
    ],
  },
];

export default routes;
